Convert vcfR objects to objects supported by other R packages
vcfR2genind(x, sep = "[|/]")vcfR2loci(x)
vcfR2genlight(x)
an object of class chromR or vcfR
character (to be used in a regular expression) to delimit the alleles of genotypes
After processing vcf data in vcfR, one will likely proceed to an analysis step. Within R, three obvious choices are: pegas, adegenet and poppr. The package pegas uses objects of type loci. The function vcfR2loci calls extract.gt to create a matrix of genotypes which is then converted into an object of type loci.
The packages adegenet and poppr use the genind object. The function vcfR2genind uses extract.gt to create a matrix of genotypes and uses the adegenet function df2genind to create a genind object. The package poppr additionally uses objects of class genclone which can be created from genind objects using poppr::as.genclone. A genind object can be converted to a genclone object with the function poppr::as.genclone.
extract.gt
,
df2genind
,
genind
,
pegas,
adegenet,
and
poppr.
To convert to objects of class DNAbin see vcfR2DNAbin
.